/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.ufpb.halloc.dados;

/**
 *
 * @author Kawe Ramon
 */
public class CursoDAOArquivoFactory extends CursoDAOFactory{

    
    public static final int TXT = 1;
    public static final int BIN = 2;
    public static final int XML = 3;
    private static CursoDAOArquivoFactory cursoDaoArquivoFactory;
    
    public CursoDAOArquivoFactory(){
        
    }
    
    public static CursoDAOArquivoFactory getInstance(){
        if(cursoDaoArquivoFactory == null){
            return new CursoDAOArquivoFactory();
        }
        
        return cursoDaoArquivoFactory;
    }
    
    
    
    @Override
    public CursoDAO cursoDAOFactory(int tipoPersistencia) {
        switch(tipoPersistencia){
            
            
            case TXT:
                return CursoDAOArquivoTxt.getInstance();
            case BIN:
                return CursoDAOArquivoBin.getInstance();
            case XML:    
                return CursoDAOArquivoXml.getInstance();
            default: return null;    
        }
        
        
        
        
    }
    
    
    
    
}
